My friend was counting the number of Creatures in his Graveyard and then randomizing the order the cards are in. Is this allowed?
By default you are not allowed to change the order of cards in a Graveyard. This is because there are some cards that care about the order that cards are in the Graveyard.
404.2. Each graveyard is kept in a single face-up pile. A player can examine the cards in any graveyard at any time but normally can't change their order. Additional rules applying to sanctioned tournaments may allow a player to change the order of cards in his or her graveyard.
However, since they haven't printed any cards since before Urza's Saga that care about Graveyard order the Magic Tournament Rules contain this rule.
3.14 Graveyard Order
In formats involving only cards from Urza’s Saga™ and later, players may change the order of their graveyard at any time. A player may not change the order of an opponent’s graveyard.
This means that Legacy and Vintage are the only common tournament formats that you can't rearrange your own Graveyard, you are allowed to in Standard, Modern, Draft and Sealed formats.
In casual play generally as long as nobody is playing with any cards where Graveyard order matters it isn't a big deal if graveyards get reordered.
Examples of cards where it matters
Nether Shadow (Alpha - 5th) http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=159265
At the beginning of your upkeep, if Nether Shadow is in your graveyard with three or more creature cards above it, you may put Nether Shadow onto the battlefield.