This article is from the Go FAQ, by Morten PAHLE email@example.com with numerous contributions by others.
Unfortunately, the method used for counting strongly depends on the
ruleset used. (See section 1.2.) However, once they are decided upon,
counting is only a matter of ordinary arithmetic. It is possible to
rearrange territories in easily counted shapes (5 x n rectangles, for
instance), but since this implies moving around the stones on the
Goban, you should find out from your Go-club how and if this is done.
On the internet, servers (and/or clients) usually count the game for
you semi-automatically. However, problems related to status of groups
(life/death/seki ?) must be decided by the players. This is probably
the weakest point of those servers w.r.t. possible cheaters (who might
remove your live groups or leave their dead groups on the Goban). If
you feel that something wrong is happening, you should ask a stronger
player for help.
By the way, fine points of Japanese-style rules are much concerned
with counting of very complicated (and exceptional) positions.
For beginners, it is therefore often very much easier to learn the
so-called 'Chinese' counting.
In case of lingering doubts, rec.games.go is the place to post.