fetch and count implemented