PlacesOfDegreeOne := Function( F )
    local  T, w, q, k, i, pl;

    
    T := AlffVarT( F );
    k := AlffConstField( F );
    q := FFSize( k );
    q := q[1] ^ q[2];
    w := FFPrimitiveElt( k );
    pl := [ 1 / T, T ];
    for i  in [ 1 .. q - 1 ]  do
        Add( pl, T + w ^ i );
    od;
    Apply( pl, function ( p )
          return AlffPlaceSplit( F, p );
      end );
    pl := Filtered( Flat( pl ), function ( p )
            return AlffPlaceDeg( p ) = 1;
        end );
    return pl;
end

function ( F, m )
    local  l, s, o;
    AlffIsGlobalAssert( F );
    if m < 1  then
        return Error( "wrong degree\n" );
    fi;
    if not IsBound( F.N )  then
        F.N := [  ];
    fi;
    if not IsBound( F.N[m] )  then
        o := AlffOrderEqFinite( F );
        l := Filtered( AlffPlaceSplitType( F, 1 / AlffVarT( F ) ),
           function ( a )
                return m mod a[2] = 0;
            end );
        s := Sum( l, function ( a )
                return a[2];
            end );
        l := Filtered( Factor( AlffOrderDisc( o ) ), function ( a )
                return m mod PolyDeg( a[1] ) = 0;
            end );
        l := Concatenation( List( l, function ( a )
                  return AlffPlaceSplit( F, a[1] );
              end ) );
        l := Filtered( l, function ( a )
                return m mod AlffPlaceDeg( a ) = 0;
            end );
        s := s + Sum( l, function ( a )
                  return AlffPlaceDeg( a );
              end );
        s := s + AlffPlacesDegOneNonSingFiniteNum( F, m );
        F.N[m] := s;
    fi;
    return F.N[m];
end
