count decl occurrence

Signed-off-by: Andrey Rybalchenko <rybal@microsoft.com>