Rotary piston machine which operates as a pump, compressor or motor, - having a rotor, having an intermediate rotor and having a counter rotor, wherein the intermediate rotor is arranged between the rotor and the counter rotor, - wherein the counter rotor has a first end face with a first toothing, wherein the intermediate rotor has a second end face with a second toothing and has a third end face with a third toothing, and wherein the rotor has a fourth end face with a fourth toothing, and each toothing (14, 18, 22, 26) is formed from at least one tooth (15, 19, 23, 27) and one tooth space, - wherein the toothings (14, 18, 22, 26) engage with one another such that meshing of the teeth of the first toothing and of the teeth of the second toothing causes first working chambers to be formed, and such that meshing of the teeth of the third toothing and of the teeth of the fourth toothing causes second working chambers to be formed, wherein volumes formed by the first and second working chambers are varied by the meshing of the teeth (15, 19, 23, 27), - having a housing with an inner wall, which housing accommodates the rotor, intermediate rotor and counter rotor, wherein the rotor, intermediate rotor and counter rotor are guided rotatably in the housing, and the inner wall largely follows an outer contour of the rotor, intermediate rotor and counter rotor, - wherein the counter rotor has a first axis of rotation, wherein the intermediate rotor has a second axis of rotation, wherein the rotor has a third axis of rotation, wherein the first axis of rotation and the second axis of rotation enclose a first angle (φ 1), wherein the second axis of rotation and the third axis of rotation enclose a second angle (φ 2), and wherein the first (φ 1) and the second angle (φ 2) are not equal to 0°, characterized in that - the rotor, the intermediate rotor and the counter rotor form, in the position in which they are assembled in the housing, a hemispherical stump, wherein "hemispherical stump" is to be understood as meaning that a sphere is cut by a first plane and by a second plane which is parallel to the first plane, wherein the first plane contains the centre point and the second plane cuts away a spherical cap, or wherein the second plane cuts away a spherical cap and the first plane does not contain the centre point but rather cuts the sphere at a location closer to the second plane, and wherein an inner wall of the housing substantially follows the outer contour of the rotor, the intermediate rotor and the counter rotor in the assembled state, and in that - the second toothing has one tooth fewer than the first toothing, in that the second toothing and the third toothing have the same number of teeth (19, 23), and in that the fourth toothing has one tooth fewer than the third toothing. - having a rotor, having an intermediate rotor and having a counter rotor, wherein the intermediate rotor is arranged between the rotor and the counter rotor, - wherein the counter rotor has a first end face with a first toothing, wherein the intermediate rotor has a second end face with a second toothing and has a third end face with a third toothing, and wherein the rotor has a fourth end face with a fourth toothing, and each toothing (14, 18, 22, 26) is formed from at least one tooth (15, 19, 23, 27) and one tooth space, - wherein the toothings (14, 18, 22, 26) engage with one another such that meshing of the teeth of the first toothing and of the teeth of the second toothing causes first working chambers to be formed, and such that meshing of the teeth of the third toothing and of the teeth of the fourth toothing causes second working chambers to be formed, wherein volumes formed by the first and second working chambers are varied by the meshing of the teeth (15, 19, 23, 27), - having a housing with an inner wall, which housing accommodates the rotor, intermediate rotor and counter rotor, wherein the rotor, intermediate rotor and counter rotor are guided rotatably in the housing, and the inner wall largely follows an outer contour of the rotor, intermediate rotor and counter rotor, - wherein the counter rotor has a first axis of rotation, wherein the intermediate rotor has a second axis of rotation, wherein the rotor has a third axis of rotation, wherein the first axis of rotation and the second axis of rotation enclose a first angle (φ 1), wherein the second axis of rotation and the third axis of rotation enclose a second angle (φ 2), and wherein the first (φ 1) and the second angle (φ 2) are not equal to 0°, - the rotor, the intermediate rotor and the counter rotor form, in the position in which they are assembled in the housing, a hemispherical stump, wherein "hemispherical stump" is to be understood as meaning that a sphere is cut by a first plane and by a second plane which is parallel to the first plane, wherein the first plane contains the centre point and the second plane cuts away a spherical cap, or wherein the second plane cuts away a spherical cap and the first plane does not contain the centre point but rather cuts the sphere at a location closer to the second plane, and wherein an inner wall of the housing substantially follows the outer contour of the rotor, the intermediate rotor and the counter rotor in the assembled state, and - the second toothing has one tooth fewer than the first toothing, in that the second toothing and the third toothing have the same number of teeth (19, 23), and in that the fourth toothing has one tooth fewer than the third toothing.