Posts::getPosts( $attributes, $pageNumber ), 'totalPosts' => count( get_posts( array_merge( Posts::query( $attributes ), [ 'posts_per_page' => -1 ] ) ) ) ] ); } } new Ajax();