Yes, I believe this is correct.However I have experimented and if I follow the another convention where if there is a loop on a vertex I still put 1 (ie, count it as one edge instead of 2) then even if the graph contains loops, the ijth entry of A^n is equal to the number of paths of length n from vertex i to vertex j.