import Control.Applicative
import Control.Monad
import Data.List

main = do
  [n, m] <- map read . words <$> getLine
  es <- map (map pred . map read) . map words <$> replicateM m getLine
  print . length . filter (isBridge n es) $ es

isBridge :: Int -> [[Int]] -> [Int] -> Bool
isBridge n es [u, v] = not . (!! v) . (!! u) . foldl1' mul . replicate n $ toMatrix n (delete [u, v] es)

toMatrix :: Int -> [[Int]] -> [[Bool]]
toMatrix n es = [[f i j | j <- [0..n-1]] | i <- [0..n-1]]
  where
    f :: Int -> Int -> Bool
    f i j
      | i == j    = True
      | otherwise = [i, j] `elem` es || [j, i] `elem` es

mul :: [[Bool]] -> [[Bool]] -> [[Bool]]
mul a b = [[foldl1' (||) $ zipWith (&&) x y | y <- transpose b] | x <- a]