entity count to metrics