Added lock count statistics.

Fixes #2.