Every entry in MAL's episode history. Each time an episode was marked watched counts once, so rewatched episodes count again.
Why this differs from MAL: MAL's episode total comes from the progress on each list entry, not from the history. An anime set to Completed without its episodes being logged counts there but not here.
Hours are each logged episode times MAL's average episode length for that anime.
An anime counts as finished when both its first and last episodes are in the history. Finishing it again on a rewatch counts again. Single-episode anime like movies aren't included.
Why this differs from MAL: MAL's Completed count only looks at list status. It includes anime set to Completed with no episodes logged, and counts each anime once however many times it was rewatched.