How to sum & count in attendance using pivot in sqlserver : I have one Table Mark_Attendance and it contains the 

    Class | [Status] | [DateTime]  | S_Adm_No  | Gender 
    NUR   | P        | 2017-04-19  | 1101      | Male
    NUR   | A        | 2017-04-19  | 1102      | Male
    NUR   | P        | 2017-04-19  | 1103      | Female
    NUR   | A        | 2017-04-19  | 1104      | Female
    KG    | P        | 2017-04-19  | 1105      | Male
    KG    | A        | 2017-04-19  | 1106      | Male
    KG    | P        | 2017-04-19  | 1107      | Female
    KG    | A        | 2017-04-19  | 1108      | Female

Now I want to show my result like 

    Class|ttl|total_male|ttl_FeMale|Ttl_Pr|Pr_Male|Pr_Female|Ttl_Ab|Ab_Female|Ab_Mal2
    NUR  |4  |  2       |   2      | 2    |2      | 2       |2     |2        |2
    KG   |4  |  2       |   2      | 2    |2      | 2       |2     |2        |2

For getting this result what query should I use in sqlserver 
Please help any one. Its very urgent....