Change output formatting and add number of results
Add support for &fromdt and &todt