I honestly don't care to look into this properly because I'm incredibly lazy but I would...

1) validate each call to your i j check function. For example, if BOTH i and j are within the boundaries give it a green light.
2)Check that you have remember the arrays start at [0,0] and not [1,1] which is a common mistake.

Have a function checkValid(). If checkValid() returns true, and that array position == '*' increment count otherwise do nothing.

isn't it kinda little....meaningless..cause, im doing the same thing that ur telling....they are being checking at the successive line...so, putting them on the same line wont do any good....while the judge is telling me wrong answer...is it?