What is REM sleep and how to measure it?