support function count. Fixes #1