The function which describe number of points per variable

I have got a list of points:data = {{1,2},{1,3},{1,4},{2,1},{2,3},{2,5},{2,6},{2,7}}. And I wanted to plot a function which will be showing the number of points for a variable, i. e. {1,2},{1,3},{1,4}, three points so for x=1 function is 3, for x=2 function is 5.