Measures of contextuality and non-contextuality