Added getTransactionCount function to return the number of transactions. Added path parameter to write function.