Accurately count rotations of object Unity C#

Pastebin: C# Rotating object - Pastebin.com

 void FixedUpdate() {
	transform.Rotate(m_RotationDirection * Time.deltaTime * m_Speed);
    Debug.Log("rotationOrigin = " + rotationOrigin);
    //Debug.Log("rotation = " + gameObject.transform.rotation.eulerAngles);
    float angleSum = 0;
    angleSum += this.gameObject.transform.rotation.eulerAngles.y;
    Debug.Log("angleSum = " + angleSum);
    if (angleSum >= 360.0f) {
      ++rotations;
      Debug.Log("rotations = " + rotations);
      angleSum -= 360;
    }
}

The above code does not work, but I feel it may be on the right path to a possible solution.

I’ve been trying to call a function based on an object making one full rotation, but I can’t seem to get a reliable call since the objects rotation speed is a variable and is a form of progression within the game.

Is there a way to do this either with a feature of Unity or with C#?
Currently there is no clamp on the maximum speed of the object, but depending on my limitations here I plan on adding one.

The faster I can spin the object while still counting its rotations, the better.

Some good Questions/Answers/Discussions that I’ve found:
Unity Forums
Unity Answers
StackOverflow

I found a solution to this, embarrassingly within one of the resources I linked. I just didn’t understand it within the context.

My fixed code is commented and explained, for anyone looking for the same thing. Though I’m still interested in more accurate solutions.

  void FixedUpdate()
  {
    //Set angle1 = eulerAngle of axis being rotated prior to applying rotation
    angle1 = this.gameObject.transform.rotation.eulerAngles.y;
    transform.Rotate(m_RotationDirection * Time.deltaTime * currentSpeed);
    //angle2 = eulerAngle of axis after rotation applied
    angle2 = this.gameObject.transform.rotation.eulerAngles.y;
    //Difference between angle2 and angle1, how much the object rotated between frames
    angledif = angle2 - angle1;

    //rotations += (int)(currentSpeed / 360) -- Don't quite understand what's going on here;

    //if object is rotating, and angle difference is less than 0
    //If object has rotated 20 degrees (currentSpeed = 20), when angle1 = 350, && angle2 = 10
    //angle2(10)-angle1(350) = -340
    //Object has rotated past 360
    if ((currentSpeed > 0) && (angledif < 0))
    {
      ++rotations;
      GameObject.FindGameObjectWithTag("ExpGained").GetComponent<ExperienceBar>().ExpMore();
    }
  }