Added argument for history function - count of messages to show