Spin modulated X-ray emission from intermediate polars