hmm...
think one more test case needs to be added.
a test case of say:
._.
|_|
...

or just:
...
..|
...

currently there is not a single case that results in correct number but has non-numeric digit in it.
I think my code would fail in such case.
_________________________
!

download KiXnet