Simple math solution
Code
# Code
```swift []
class Solution {

    func convertTimeStringToMinutes(_ timeString: String) -> Int {
        let split = timeString.split(separator: ":")
        return (Int(split[0]) ?? 0) * 60 + (Int(split[1]) ?? 0)
    }

    func numberOfRounds(_ loginTime: String, _ logoutTime: String) -> Int {
        var start = convertTimeStringToMinutes(loginTime), end = convertTimeStringToMinutes(logoutTime)
        // following this from question - If logoutTime is earlier than loginTime, 
        // this means you have played from loginTime to midnight and from midnight to logoutTime.
        if end < start { end += 24 * 60 }

        var ans = 0
        for time in start...end where time % 15 == 0 && end-time >= 15 {
            ans += 1
        }
        return ans

    }
}
```
['Math', 'String', 'Swift']