This is simple in SQL. There are multiple ways of doing it. For example, using a GROUP BY...
SELECT published_posts, COUNT(published_posts) FROM Table1 WHERE publish_date > '2017-02-20' GROUP BY published_posts
SELECT published_posts, COUNT(published_posts) FROM Table1 WHERE publish_date > '2017-02-20' GROUP BY published_posts
I use it for tacking on extra filtering terms as well: