Suppose KubsetS3 is a knot and suppose p and q are co-prime integers with q≥1. For any field K, we establish a dimension formula for the framed instanton homology of knot surgeries: dimIharp(Sp/q3(K);K)=q⋅rK(K)+∣p−q⋅I^½harpK(K)∣ for certain integers rK(K) and I^½harpK(K), except possibly when p/q=I^½harpK(K) and I^½harpK(K) is even. This formula generalizes the result of Baldwin--Sivek from the case K=C to arbitrary fields. Based on the result for K=Z/2, we obtain that Sp/q3(K) is not SU(2)-abelian for any knot K other than the unknot and the right-handed trefoil whenever p/q∈[0,6) and p∈{ae,2ae} for some prime number a and natural number e, thereby extending existing results for p/q∈[0,5] and p=ae. A byproduct of the techniques developed in this paper is that we generalize the distance-two surgery exact triangle by Culler--Daemi--Xie and Daemi--Miller-Eismeier--Lidman from Z/2 coefficients to any coefficient ring.