Stack calculator counting expressions of polish notation type