I need to know how can I count the number of operations performed during a calculation of a CompoundExpression.
In some of these expressions there are Dot products between matrices and I want to count how many additions a multiplications are performed in each of these calculations.
In other words, I need a functions that does the same as the function cost of Maple (http://www.maplesoft.com/support/help/Maple/view.aspx?path=codegen/cost)
For instance, I want to know how many additions and multiplications are performed in the execution of the following function:
LinearSolve[Dot[{{1, 2}, {3, 4}}, {{5, 6}, {3, 4}}], {5, 6}]
How can I do it?