input: Write a function to update a document in MongoDB and return the modified count.
  assert update_document("mydatabase", "collection", {"name": "John Doe"}, {"$set": {"age": 28}}) == 1
  assert update_document("mydatabase", "collection", {"name": "Jane Doe"}, {"$set": {"age": 30}}) == 0
output: def update_document(database_name, collection_name, filter_query, update_query):
      from pymongo import MongoClient
      client = MongoClient()
      db = client[database_name]
      collection = db[collection_name]
      result = collection.update_one(filter_query, update_query)
      return result.modified_count