erlang exercise: count to 10