There is probably a better way to do this, but this is a working example. Let's assume this is your data:
+---+
| 4 |
| 4 |
| 5 |
| 6 |
| 7 |
| 7 |
| 7 |
| 8 |
| 9 |
+---+
This column should be copied and pasted into column B. Click Remove Duplicates after selecting it. Add the following formula to C1: =COUNTIF (A:A;B1) (Use a; in Excel 2010 and later, use a, otherwise. Click and drag the black square from C1's bottom right corner all the way down to column B's bottom.
Now, your spreadsheet ought to resemble the following (with the formula result instead of the formula itself):
+---+---+------------------+
| A | B | C |
+---+---+------------------+ // Actual values of column C
| 4 | 4 | =COUNTIF(A:A;B1) | // 2
| 4 | 5 | =COUNTIF(A:A;B2) | // 1
| 5 | 6 | =COUNTIF(A:A;B3) | // 1
| 6 | 7 | =COUNTIF(A:A;B4) | // 3
| 7 | 8 | =COUNTIF(A:A;B5) | // 1
| 7 | 9 | =COUNTIF(A:A;B6) | // 1
| 7 | | |
| 8 | | |
| 9 | | |
+---+---+------------------+
Finally, create a graph as you normally would. Make your Legend Entries (Series) your column C, and your Horizontal (Category) Axis Labels column B.
This will result in a graph looking like this:
: